<?php

declare(strict_types=1);

namespace ImiApp\ApiServer\Api\Model\Base;

use Imi\Config\Annotation\ConfigValue;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Entity;
use Imi\Model\Annotation\Table;
use ImiApp\ImiServer\AbstractModel as Model;

/**
 * 充值贝壳 基类.
 *
 * @Entity(camel=false, bean=true, incrUpdate=false)
 * @Table(name=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\RechargeShell.name", default="fa_recharge_shell"), usePrefix=false, id={"id"}, dbPoolName=@ConfigValue(name="@app.models.ImiApp\ApiServer\Api\Model\RechargeShell.poolName"))
 * @DDL(sql="CREATE TABLE `fa_recharge_shell` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `score` decimal(10,2) DEFAULT NULL COMMENT '送积分',
  `shell` decimal(10,2) DEFAULT NULL COMMENT '充多少贝壳',
  `money` decimal(10,2) DEFAULT NULL COMMENT '价格',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='充值贝壳'", decode="")
 *
 * @property int|null $id 
 * @property string|float|int|null $score 送积分
 * @property string|float|int|null $shell 充多少贝壳
 * @property string|float|int|null $money 价格
 */
abstract class RechargeShellBase extends Model
{
    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEY = 'id';

    /**
     * {@inheritdoc}
     */
    public const PRIMARY_KEYS = ["id"];

    /**
     * id.
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true, unsigned=true, virtual=false)
     * @var int|null
     */
    protected ?int $id = NULL;

    /**
     * 获取 id.
     *
     * @return int|null
     */
    public function getId(): ?int
    {
        return $this->id;
    }

    /**
     * 赋值 id.
     * @param int|null $id id
     * @return static
     */
    public function setId($id)
    {
        $this->id = null === $id ? null : (int)$id;
        return $this;
    }

    /**
     * 送积分.
     * score
     * @Column(name="score", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $score = NULL;

    /**
     * 获取 score - 送积分.
     *
     * @return string|float|int|null
     */
    public function getScore()
    {
        return $this->score;
    }

    /**
     * 赋值 score - 送积分.
     * @param string|float|int|null $score score
     * @return static
     */
    public function setScore($score)
    {
        $this->score = null === $score ? null : $score;
        return $this;
    }

    /**
     * 充多少贝壳.
     * shell
     * @Column(name="shell", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $shell = NULL;

    /**
     * 获取 shell - 充多少贝壳.
     *
     * @return string|float|int|null
     */
    public function getShell()
    {
        return $this->shell;
    }

    /**
     * 赋值 shell - 充多少贝壳.
     * @param string|float|int|null $shell shell
     * @return static
     */
    public function setShell($shell)
    {
        $this->shell = null === $shell ? null : $shell;
        return $this;
    }

    /**
     * 价格.
     * money
     * @Column(name="money", type="decimal", length=10, accuracy=2, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false, unsigned=false, virtual=false)
     * @var string|float|int|null
     */
    protected $money = NULL;

    /**
     * 获取 money - 价格.
     *
     * @return string|float|int|null
     */
    public function getMoney()
    {
        return $this->money;
    }

    /**
     * 赋值 money - 价格.
     * @param string|float|int|null $money money
     * @return static
     */
    public function setMoney($money)
    {
        $this->money = null === $money ? null : $money;
        return $this;
    }

}
